﻿@model RBS.Core.Model.SYS_City 
@{
    ViewBag.Title = "新增城市";
    Layout = "~/Views/Shared/_Layout.cshtml"; 
}
  
<!--内容-->
<div class="content-tab-wrap">
    <div id="floatHead" class="content-tab">
        <div class="content-tab-ul-wrap">
            <ul>
                <li><a href="javascript:;" onclick="tabs(this);" class="selected">城市信息维护</a></li>
            </ul>
        </div>
    </div>
</div>

@using (Ajax.BeginForm("AddCity",new AjaxOptions { OnSuccess = "OnSuccess" }))
{
        @Html.AntiForgeryToken()
        @Html.ValidationSummary(true) 
        @Html.HiddenFor(model => model.Id) 
        @Html.HiddenFor(model => model.CreateDate) 
        @Html.HiddenFor(model => model.UpdateDate)
        @Html.HiddenFor(model => model.ProvinceId)  
    <div class="tab-content"> 
	   	  <dl><dt>		
		 城市名称</dt>
        <dd>           
		   @Html.TextBoxFor(model => model.CityName, null, new { @class = "input normal", datetype="s2-6",nullmsg="请输入城市名称" }) 
		 <span class="Validform_checktip">*</span> 
        </dd></dl>
				<dl><dt>		
		 邮政编码</dt>
        <dd>           
		   @Html.TextBoxFor(model => model.ZipCode, null, new { @class = "input normal" }) 
		 <span class="Validform_checktip">*</span> 
        </dd></dl> 
    </div>
    <!--/内容-->

    <!--工具栏-->
    <div class="page-footer" style="display: none"> 
        <div class="btn-list">
            <input type="submit" value="提交保存" class="btn" id="btnSubmit" name="btnSubmit" />
            <input id="btnReturn" name="btnReturn" type="button" value="返回上一页" class="btn yellow" onclick="javascript: history.back(-1);" />

        </div>
        <div class="clear"></div>
    </div>
    <!--/工具栏-->
          
}  
    <script>
        $.ajaxSetup({
            async: false
        });
        var api = frameElement.api, W = api.opener;
        api.button({
            id: 'valueOk',
            name: '确定',
            callback: ok
        });
        function OnSuccess(s) { 
            // $.dialog.alert("111");
            //api.reload(); 
        } 
        function ok() { 
            $("#btnSubmit").click();
            W.treeLoad($("#ProvinceId").val());
        };
    </script>










 
 